import java.awt.*;
import java.sql.SQLOutput;
import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-07
 * Time: 14:29
 */
public class Tested {
    public static void main14(String[] args) {
        for (int i = 100; i < 1000; i++) {
            int a = i % 10;//个位
            int b = i/10%10;//十位
            int c = i/100;//百位
            if(i == a*a*a+b*b*b+c*c*c){
                System.out.println(i+"是水仙花数");
            }
        }
    }
    public static void main13(String[] args) {
        int count = 0;
        for (int i = 1; i <= 100 ; i++) {
            int a = i % 10;
            int b = i / 10 ;
            if(a == 9){
                count++;
            }
            if(b == 9){
                count++;
            }
        }
        System.out.println(count);
    }
    public static void main12(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        int count = 0;
        for (int i = 2; i < num; i++) {
            if( num % i ==0){
                count++;
            }
        }
        if(count == 0){
            System.out.println(num+"是素数");
        }else{
            System.out.println(num+"不是素数");
        }
    }
    public static void main11(String[] args) {
        for (int i = 1; i <= 100; i++) {
            int count = 0;
            for (int j = 2; j < i; j++) {
                if(i % j ==0){
                    count++;
                }
            }
            if(count == 0){
                System.out.println(i);
            }
        }
    }
    public static void main10(String[] args) {
        for (int i = 1000; i <= 2000 ; i++) {
            if( i % 100 == 0){
                if( i % 400 ==0){
                    System.out.println(i);
                }
            }else{
                if(i % 4 == 0){
                    System.out.println(i);
                }
            }
        }
    }
    public static void main9(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        while(a % b != 0){
            int tmp = b;
            b = a%b;
            a = b;
        }
        System.out.println(b);
    }
    public static void main8(String[] args) {
        Scanner scan = new Scanner(System.in);
        int count = 0;
        String password = "abc";
        while(scan.hasNext()){
            String ret = scan.nextLine();
            if(ret.equals(password)){
                System.out.println("密码正确");
                break;
            }else{
                System.out.println("密码错误，请重新输入");
                count++;
            }
            if(count == 3){
                System.out.println("警告，账号已锁死");
                break;
            }
        }
    }
    public static void main7(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        for (int i = 1; i <= num; i++) {
            for (int j = 1; j <= i ; j++) {
                System.out.print(j+"*"+i+"="+i*j+" ");
            }
            System.out.println();
        }
    }
    public static void main6(String[] args) {
        //猜字谜游戏;
        Scanner scan = new Scanner(System.in);
        Random rand = new Random(20220507);
        int randNum = rand.nextInt(101);//[0,101)
        //int randNum2 = rand.nextInt(100)+1;//[1,100)
        System.out.println(randNum+"答案");
        while(true){
            System.out.println("请输入你要猜的数字");
            int num = scan.nextInt();
            if(num > randNum){
                System.out.println("猜大了");
            }
            if(num == randNum){
                System.out.println("猜对了");
                break;
            }
            if(num < randNum){
                System.out.println("猜小了");
            }
        }
    }
    public static void main5(String[] args) {
        int i = 1;
        while(i <= 100){
            if(i%3!=0 || i%5!=0){
                i++;
                continue;
            }
            System.out.println(i);
            i++;
        }
    }
    public static void main4(String[] args){
        //switch
        //switch中不能使用的数据类型  long float double boolean
        int a = 1;
        switch(a){  // int short char String
            case 1:
                System.out.println(1);
                break;
            case 2:
                System.out.println(2);
                break;
            case 3:
                System.out.println(3);
                break;
            default:
                System.out.println("输入错误");
                break;
        }
    }
    public static void main3(String[] args) {
        //1!+2!+3!+……;
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum = 0;
        int j = 1;
        while(j <= n){
            int i = 1;
            int ret = 1;
            while( i <= j){
                ret = ret * i ;
                i++;
            }
            sum = sum +ret;
            j++;
        }
        System.out.println(sum);
        System.out.println(Integer.MAX_VALUE);
    }
    public static void main2(String[] args) {
        //1-100偶数的和奇数的和，和他们的和
        int i = 1;
        int sum = 0;
        int on = 0;
        int en = 0;
        while( i <= 100){
            if( i % 2 == 0){
                 on += i;
            }else{
                en += i;
            }
            sum = en+on;
            i++;
        }
        System.out.println(on);
        System.out.println(en);
        System.out.println(sum);
    }
    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        //从键盘多次输入
        while(scan.hasNextInt()){
            int year = scan.nextInt();
            if (year % 100 == 0){
                if(year % 400 == 0){
                    System.out.println(year+"是闰年");
                }else{
                    System.out.println(year+"不是闰年");
                }
            }else{
                if(year % 4 == 0){
                    System.out.println(year+"是闰年");
                }else{
                    System.out.println(year+"不是闰年");
                }
            }
        }
    }
}
